package com.sophossystems.client.asmon.hibernate;

import java.io.Serializable;

import com.sophossystems.client.asmon.dto.PrivilegeDTO;

public class Privilege implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7348222459486987917L;

	/** 
	 * This attribute maps to the column idPrivilege in the Privilege table.
	 */
	protected int idPrivilege;

	/** 
	 * This attribute maps to the column idRole in the Privilege table.
	 */
	protected int idRole;

	/** 
	 * This attribute represents whether the primitive attribute idRole is null.
	 */
	protected boolean idRoleNull = true;

	/** 
	 * This attribute maps to the column idActivity in the Privilege table.
	 */
	protected int idActivity;

	/** 
	 * This attribute represents whether the primitive attribute idActivity is null.
	 */
	protected boolean idActivityNull = true;

	/** 
	 * This attribute maps to the column enabled in the Privilege table.
	 */
	protected int enabled;

	/** 
	 * This attribute represents whether the primitive attribute enabled is null.
	 */
	protected boolean enabledNull = true;

	/**
	 * Method 'Privilege'
	 * 
	 */
	public Privilege()
	{
	}

	/**
	 * Method 'getIdPrivilege'
	 * 
	 * @return int
	 */
	public int getIdPrivilege()
	{
		return idPrivilege;
	}

	/**
	 * Method 'setIdPrivilege'
	 * 
	 * @param idPrivilege
	 */
	public void setIdPrivilege(int idPrivilege)
	{
		this.idPrivilege = idPrivilege;
	}

	/**
	 * Method 'getIdRole'
	 * 
	 * @return int
	 */
	public int getIdRole()
	{
		return idRole;
	}

	/**
	 * Method 'setIdRole'
	 * 
	 * @param idRole
	 */
	public void setIdRole(int idRole)
	{
		this.idRole = idRole;
		this.idRoleNull = false;
	}

	/** 
	 * Sets the value of idRoleNull
	 */
	public void setIdRoleNull(boolean idRoleNull)
	{
		this.idRoleNull = idRoleNull;
	}

	/** 
	 * Gets the value of idRoleNull
	 */
	public boolean isIdRoleNull()
	{
		return idRoleNull;
	}

	/**
	 * Method 'getIdActivity'
	 * 
	 * @return int
	 */
	public int getIdActivity()
	{
		return idActivity;
	}

	/**
	 * Method 'setIdActivity'
	 * 
	 * @param idActivity
	 */
	public void setIdActivity(int idActivity)
	{
		this.idActivity = idActivity;
		this.idActivityNull = false;
	}

	/** 
	 * Sets the value of idActivityNull
	 */
	public void setIdActivityNull(boolean idActivityNull)
	{
		this.idActivityNull = idActivityNull;
	}

	/** 
	 * Gets the value of idActivityNull
	 */
	public boolean isIdActivityNull()
	{
		return idActivityNull;
	}

	/**
	 * Method 'getEnabled'
	 * 
	 * @return int
	 */
	public int getEnabled()
	{
		return enabled;
	}

	/**
	 * Method 'setEnabled'
	 * 
	 * @param enabled
	 */
	public void setEnabled(int enabled)
	{
		this.enabled = enabled;
		this.enabledNull = false;
	}

	/** 
	 * Sets the value of enabledNull
	 */
	public void setEnabledNull(boolean enabledNull)
	{
		this.enabledNull = enabledNull;
	}

	/** 
	 * Gets the value of enabledNull
	 */
	public boolean isEnabledNull()
	{
		return enabledNull;
	}

	public void mapper(PrivilegeDTO privilege){
		
		this.enabled = privilege.getEnabled();
		this.idActivity = privilege.getIdActivity();
		this.idPrivilege = privilege.getIdPrivilege();
		this.idRole = privilege.getIdRole();
		
	}
}
